package cn.wjssl.infrastructure.persistent.dao;

import cn.bugstack.middleware.db.router.annotation.DBRouter;
import cn.bugstack.middleware.db.router.annotation.DBRouterStrategy;
import cn.wjssl.infrastructure.persistent.po.RaffleActivityAccountDayPO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 抽奖活动账户表-日次数
 */
@Mapper
public interface IRaffleActivityAccountDayDao {

    // 更新日账户
    int updateActivityAccountDaySubtractionQuota(RaffleActivityAccountDayPO accountDayPO);

    // 新建日账户
    int insertActivityAccountDay(RaffleActivityAccountDayPO accountDayPO);

    // 查询日账户
    @DBRouter
    RaffleActivityAccountDayPO queryActivityAccountDayByUserId(RaffleActivityAccountDayPO accountDayPO);

    // 查询用户当前抽奖次数
    @DBRouter
    Integer queryRaffleActivityAccountDayPartakeCount(RaffleActivityAccountDayPO accountDayPO);

    // 增加日账户库存
    int addAccountQuota(RaffleActivityAccountDayPO accountDayPO);
}
